package teacher.service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;

import teacher.service.teacher;
import teacher.bean.Patent;
import teacher.bean.Teacher;
import teacher.bean.Treatise;
import teacher.service.treatise;
import teacher.bean.Flow;

import teacher.service.paper;
import teacher.bean.Paper;
import tools.StringDate;

import teacher.bean.Students;
import teacher.service.student;
import teacher.service.flow;

public class test {

public static void main(String[] args){
	
	teacher t=new teacher();
	Teacher tb=new Teacher();
	List<Teacher> l=new ArrayList<Teacher>();
	
	paper p=new paper();
	Paper pb=new Paper();
	List<Paper> lp=new ArrayList<Paper>();
	
	patent pa=new patent();
	Patent pab=new Patent();
	List<Patent> lpa=new ArrayList<Patent>();
	
	Treatise trb=new Treatise();
	treatise tr=new treatise();
	List<Treatise> ltr=new ArrayList<Treatise>();
	
	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
	System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
	
	/*Students s=new Students();
	s.setStuId(5);
	System.out.println(new student().deleteStu(s));*/

	/*tb.setTeaId(374);
	List<Student> sl=new ArrayList<Student>();
	sl=s.selectStudentByTeacher(tb);
	System.out.println(sl.size());*/
	
	/*sb.setAward(1);
	sb.setDegree(1);
	sb.setDegreePaper(1);
	sb.setLeave(1);
	Date d1 = new StringDate().StringToDate("2013-1-1");
	sb.setLeaveDate(d1);
	sb.setName("1");
	sb.setNumber("1");
	sb.setProject(1);
	sb.setSex(1);
	if
	(s.insertStu(sb)){
		System.out.println("1");
	}else{
		System.out.println("2");
	}*/
	/*trb=tr.selectTreatiseById(4);
	trb.setAuthor("1");
	tr.updateTreatise(trb, 4);*/
	
	/*Teacher q=new Teacher();
	q.setUser("03860");
	tb=t.SelectTeacher(q);
	System.out.println(tb.getTeaId());*/
	
/*	degreePaper d=new degreePaper();
	tb.setTeaId(1);
	System.out.println(d.getCountDegreePaperTeaVague(tb,"1"));*/
	
	/*Date d1 = new StringDate().StringToDate("2013-1-1");
	Date d2 = new StringDate().StringToDate("2015-12-31");
	degreePaper d=new degreePaper();
	tb.setTeaId(1);
	System.out.println(d.getCountDegreePaperTeaTime(tb, d1, d2));*/
	
	
	/*ltr=tr.selectVagueTreatise("2");
	System.out.println(ltr.size());*/
	
	/*Date d1 = new StringDate().StringToDate("2013-1-1");
	Date d2 = new StringDate().StringToDate("2014-12-31");
	tb.setTeaId(1);
	lpa=pa.selectTimePatentTea(tb, d1, d2);
	System.out.println(lpa.size());*/
	
	
	/*lpa=pa.selectVaguePatent("一");
	System.out.println(lpa.size());*/
	
	/*pb.setTeaId(1);
	tb=t.SelectTeaByPap(pb);
	System.out.println(tb.getName());*/
	
	/*pb.setPapId(8);
	Paper pp=p.SelectPaperById(pb);
	System.out.println(pp.getFauthor());*/
	
	/*tb.setTeaId(1);
	int a=p.getCountPaperTea(tb);
	System.out.println(a);*/
	
	/*tb.setUser("user");
	tb.setPassword("password");
	if(t.CheckTeacher(tb)){
		System.out.println("CheckTeacher测试成功！");
	}
	else{
		System.out.println("CheckTeacher测试失败");	
	}*/
	
	/*l=t.SelectAllTeacher();
	System.out.println(l.get(0).getDuty());
	System.out.println(l.get(0).getFurStud());
	System.out .println("SelectAllTeacher测试成功");*/
	
	/*tb.setUser("user");
	Teacher	tb1=new Teacher();
	tb1 =t.SelectTeacher(tb);
	System.out.println(tb1.getDuty());
	System.out.println(tb1.getFurStud());
	System.out.println("SelectTeacher测试成功");*/
	
	/*Teacher tb1=new Teacher();
	Teacher tb2=new Teacher();
	tb1.setUser("user");
	tb2=t.SelectTeacher(tb1);
	tb2.setDuty("newDuty");
	if(t.updateTeacher(tb2, tb1)){
	System.out.println("updateTeacher测试成功");
	}*/
	
	/*tb.setUser("2");
	if(t.DeleteTeacher(tb)){
		System.out.println("DeleteTeacher测试成功");
	}*/
	
	/*int a=t.getCountTeacher();
	System.out.println(a);
	System.out.println("getCountTeacher测试成功");*/
	
	/*int a= p.getCountPaper();
	System.out.println(a);*/
	
	/*lp = p.selectVagueTeacher("22");
	System.out.println(lp.size());*/
	
	
	/*Date d1 = new StringDate().StringToDate("2015-5-1");
	Date d2 = new StringDate().StringToDate("2015-5-30");
	lp=p.selectTimeTeacher(d1, d2);
	System.out.println(lp.size());*/
	
	
	
   }
}
